USE [GESTION2]
GO

/****** Object:  StoredProcedure [dbo].[WASP_D0007_CREA_TABLA_SECURITIZACION]    Script Date: 11/23/2011 11:19:30 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WASP_D0007_CREA_TABLA_SECURITIZACION]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WASP_D0007_CREA_TABLA_SECURITIZACION]
GO

USE [GESTION2]
GO

/****** Object:  StoredProcedure [dbo].[WASP_D0007_CREA_TABLA_SECURITIZACION]    Script Date: 11/23/2011 11:19:30 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[WASP_D0007_CREA_TABLA_SECURITIZACION]
AS

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FSEC10_DIA]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[FSEC10_DIA]

CREATE TABLE [dbo].[FSEC10_DIA] 
(
	[Sec01PgCod] [smallint] NOT NULL ,
	[Sec10AoMod] [smallint] NOT NULL ,
	[Sec10AoSuc] [smallint] NOT NULL ,
	[Sec10AoMda] [smallint] NOT NULL ,
	[Sec10AoPap] [smallint] NOT NULL ,
	[Sec10AoCta] [int] NOT NULL ,
	[Sec10AoOpe] [int] NOT NULL ,
	[Sec10AoSbO] [smallint] NOT NULL ,
	[Sec10AoTOp] [smallint] NOT NULL ,
	[Sec01PtCta] [int] NULL ,
	[Sec10EmCta] [int] NULL ,
	[Sec10StsPt] [smallint] NULL ,
	[Sec10SegOp] [smallint] NULL ,
	[Sec10FecPr] [datetime] NULL ,
	[Sec10FecSe] [datetime] NULL ,
	[Sec10NroRf] [int] NULL ,
	[Sec10FecRf] [datetime] NULL ,
	[Sec10PzoMo] [int] NULL ,
	[Sec10CapOr] [decimal](17, 2) NULL ,
	[Sec10CapSe] [decimal](17, 2) NULL ,
	[Sec10Sdo] [decimal](17, 2) NULL ,
	[Sec10CuPen] [smallint] NULL ,
	[Sec10CuTot] [smallint] NULL ,
	[Sec10FVto] [datetime] NULL ,
	[Sec10CIsla] [datetime] NULL ,
	[Sec10FUlCb] [datetime] NULL ,
	[Sec10CapCb] [decimal](17, 2) NULL ,
	[Sec10IntCb] [decimal](17, 2) NULL ,
	[Sec10MvSuc] [smallint] NULL ,
	[Sec10MvMod] [smallint] NULL ,
	[Sec10MvTrn] [smallint] NULL ,
	[Sec10MvNRe] [smallint] NULL ,
	[Sec10MvFec] [datetime] NULL ,
	[Sec10MvOrd] [smallint] NULL ,
	[Sec10MvSbO] [smallint] NULL ,
	[Sec10FCPPg] [datetime] NULL ,
	[Sec10CuPPg] [smallint] NULL ,
	[Sec10MtPPg] [decimal](17, 2) NULL ,
	[Sec10MorEm] [decimal](17, 2) NULL ,
	[Sec10CuDif] [decimal](17, 2) NULL ,
	[Sec10FVCal] [datetime] NULL ,
	[Sec10Imp01] [decimal](17, 2) NULL ,
	[Sec10Imp02] [decimal](17, 2) NULL ,
	[Sec10Imp03] [decimal](17, 2) NULL ,
	[Sec10FVPCu] [datetime] NULL ,
	[Sec10NrPCu] [smallint] NULL ,
	[Sec10IReaj] [decimal](17, 2) NULL ,
	[Sec10CbJud] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Sec10TTsa] [smallint] NULL ,
	[Sec10Tsa] [decimal](10, 6) NULL ,
	[Sec10TsaMr] [decimal](10, 6) NULL ,
	[Sec10FVal] [datetime] NULL ,
	[Sec10SdoIx] [decimal](17, 4) NULL ,
	[Sec10SdoMN] [decimal](17, 2) NULL ,
	[Sec10FUPPg] [datetime] NULL ,
	[Sec10CuInf] [smallint] NULL ,
	[Sec10MtInf] [decimal](17, 2) NULL ,
	[Sec10IntsD] [decimal](17, 2) NULL ,
	[Sec10GasCb] [decimal](17, 2) NULL ,
	[Sec10SbUPP] [smallint] NULL ,
	[Sec10SbHoy] [smallint] NULL ,
	[Sec10StRec] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Sec10DPlan] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Sec10TUPPg] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Sec10LIdRf] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Sec10ViaPr] [smallint] NULL ,
	[Sec10SdoMP] [decimal](17, 2) NULL ,
	[Sec10InCuD] [decimal](17, 2) NULL ,
	[Sec10InMor] [decimal](17, 2) NULL ,
	[Sec10InPen] [decimal](17, 2) NULL ,
	[Sec10LNrSl] [int] NULL ,
	[Sec10LFeSl] [datetime] NULL ,
	[Sec10LIdSl] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
	[Sec10KyRan] [decimal](11, 0) NULL ,
	[Sec10VaPre] [decimal](17, 2) NULL ,
	[Sec10UtRev] [decimal](17, 2) NULL 
) ON [PRIMARY]

GO

